<template>
	<view class="page" style="height: 100vh;">
		<free-nav-bar showback showright="true" title="群公告">

			<view slot="right" class="main-bg-color rounded mr-3 px-2 py-1">
				<text class="font text-white" @click="baocun">推送</text>


			</view>
		</free-nav-bar>


		<textarea name="" style="width: 100%;" v-model="content" placeholder="请填写内容" class="bg-white p-2 font-md" id=""
			cols="30" rows="10"></textarea>
	</view>
</template>

<script>
	import freeNavBar from "@/components/free-ui/free-nav-bar.vue"
	import $H from '../../../utils/request.js';
	import freeListItem from "@/components/free-ui/free-list-item.vue"
	export default {
		components: {
			freeNavBar,
			freeListItem
		},
		data() {
			return {
				reported_id: "",
				reported_type: "",
				category: "",
				content: "",
			}
		},
		onLoad(e) {
			if (e.remark) {
				this.content = e.remark
			}
			if (e.id) {
				this.id = e.id
			}
		},
		methods: {
			baocun() {

				if (this.content == '') {
					return uni.showToast({
						icon: "none",
						title: "请输入内容"
					})
				}
				$H.post("group/groupupdateremark", {
					id: this.id,
					remark: this.content,

				}, {
					token: true
				}).then(res => {
					console.log(res, "res")
					if (res) {
						uni.navigateBack({
							delta: 1
						})
						uni.showToast({
							icon: "none",
							title: "推送成功"
						})
					}
				})


			},
		
		}
	}
</script>

<style>

</style>
